﻿namespace WizardEngine.Core
{
    using Specification;

    /// <summary>
    /// Represents conditional transition to the following step.
    /// </summary>
    /// <typeparam name="T"></typeparam>
    internal class Transition<T> where T : FlowState, new()
    {
        /// <summary>
        /// Target step visited. 
        /// </summary>
        public Step Target
        {
            get; private set;
        }

        /// <summary>
        /// Flow state memento just after entering the step.
        /// </summary>
        public TransitionCondition<T> Condition
        {
            get; private set;
        }

        public Transition(Step target, TransitionCondition<T> condition)
        {
            this.Target = target;
            this.Condition = condition;
        }
    }
}
